{{>licenseInfo}}
package {{invokerPackage}};

import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.ZonedDateTime;

import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.Module.SetupContext;

{{>generatedAnnotation}}

public class RFC3339JavaTimeModule extends SimpleModule {
    private static final long serialVersionUID = 1L;

    public RFC3339JavaTimeModule() {
        super("RFC3339JavaTimeModule");
    }

   @Override
   public void setupModule(SetupContext context) {
       super.setupModule(context);

       addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT);
       addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME);
       addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME);
   }

}
